<?php
/**
 * Enter description here ...
 * @author Micou13630
 *
 */
class RadioGroupItem extends FormItem implements IRenderable {
	 
	protected $itemProperties;
	protected $vertical;
	protected $wrap;
	
	public function RadioGroupItem($name) {
		parent::FormItem($name, Constant::EDITOR_TYPE_RADIOGROUP);
		
	}
	
	/**
	 * Enter description here ...
	 * @param unknown_type $key
	 * @param unknown_type $value
	 */
	public function addValue($value) {
		$this->valueMap[] = new RadioValue($value);
	}
	
	/**
	 * Implementation de object
	 * @see IRenderable::object()
	 */
	public function object() {
		return get_class($this);
	}

	/**
	 * Implementation de properties
	 * @see IRenderable::properties()
	 */
	public function properties() {
		return parent::getProp($this);
	}

	/**
	 * Implementation de scLog
	 * @see IRenderable::scLog()
	 */
	public function scLog() {
		ScCollectionLog::getInstance()->addSc(new ScLog($this->object(), get_object_vars($this)));
	}
	
	/**
	 * Implementation de render
	 * @see IScreen::render()
	 */
	public function render() {
		$this->scLog();
		return "{".$this->properties()."}";
	}
}

/**
 * Enter description here ...
 * @author Micou13630
 *
 */
class RadioValue implements IRenderable {

	private $value;
	
	public function RadioValue($value) {
		$this->value = $value;
	}
	
	/**
	 * Implementation de object
	 * @see IRenderable::object()
	 */
	public function object() {
		return null;
	}

	/**
	 * Implementation de properties
	 * @see IRenderable::properties()
	 */
	public function properties() {
		return null;
	}
	
	/**
	 * Implementation de scLog
	 * @see IRenderable::scLog()
	 */
	public function scLog() {
		//
	}
	
	/**
	 * Implementation de render
	 * @see IScreen::render()
	 */
	public function render() {
		return "\"".$this->value."\"";
	}
}
?>
